//
//  UIBarButtonItem+extension.swift
//  KySwiftPro
//
//  Created by fangyukui on 2017/10/17.
//  Copyright © 2017年 fangyukui. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    
    //MARK: My UIBarButtonItem
    convenience init(title:String,
                     target:Any,
                     action:Selector,
                     isBack:Bool = false) {
        var btn : UIButton
        
        if isBack {
            btn  = UIButton(nomalImg:"back-.png",hlTextColor: UIColor.orange, title: title,target: target, action: action)
        }else{
            btn  = UIButton(hlTextColor: UIColor.orange, title: title, target: target, action: action)
        }
        
        self.init(customView: btn)
        
    }
    
    

}
